<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./echarts.js"></script>
</head>

<body>
    <div style="width: 100%;height:800px" id="main"></div>
</body>

</html>
<script>
    let main = document.querySelector('#main')
    let obj = echarts.init(main)
    let option = {

        xAxis: {
            data: ['日化', '蔬菜', '电器', '美妆']
        },

        yAxis: {},

        series: [
            {
// k线图
            type: 'candlestick',
            data:[ 
                [20,30,40,50],
                [40,30,20,10],
                [23,33,43,53],
                [48,38,28,18]
            ]
        }
    ],
    }
    obj.setOption(option)
</script>